{% extends 'base.html' %}
{% block title %}
Register Page
{%endblock%}

{%block content%}

<body class="text-center">
    <div class="container">
        <form method='POST' class="form-register" style="color: white">
            <!-- 如果没有下面一行不能输入密码，CSRF攻击 -->
            {{ form.hidden_tag() }}
            <h3 class="mb-3 font-weight-normal">Please Create your Account</h3>
            <hr>
            {{ form.username.label() }}
            {{ form.username(class="form-control",placeholder='User name') }}

            {{ form.email_address.label() }}
            {{ form.email_address(class="form-control",placeholder='Email Address') }}
            
            {{ form.password1.label() }}
            {{ form.password1(class="form-control",placeholder='Password') }}

            {{ form.password2.label() }}
            {{ form.password2(class="form-control",placeholder='Confirm Password') }}
            <hr>
            <div class="checkbox mb-3">
                <h6>Already have an Account</h6>
                <a class="btn btn-sm btn-secondary" href="{{ url_for('login_page')}}">Goto Login</a>
            </div>
            {{ form.submit(class="btn btn-lg btn-block btn-primary") }}
        </form>
    </div>
</body>

{%endblock%}